package club.beimeng.demos.de2021年4月15日;

import java.util.Scanner;

public class One {

    public static double pjf(int n){
        double [] grade = new double[n+1];
        grade[0] = 0;
        int i ;
        double sum = 0;
        double average = 0;
        for ( i = 0;i<n;i++){
            double cj =(100*Math.random());
            sum = sum + cj;
            grade[i] = cj;
            System.out.println((i+1)+"号学生英语成绩为："+ String.format("%.2f",grade[i]) +"\t");
        }
        average = sum /n;
        return average;
    }
    public static void main(String[]args){
        System.out.println("请输入您想录入的学生人数：");
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        System.out.println("平均分为："+String.format("%.2f",pjf(x)));

    }


}
/*
 *
 * @author Mr.Bao
 * @date
 */